/**
 * EventListener is used to define listener to events
 * instanciated with Event.
 *
 * A listener's notification callback can be declared as:
 *  -a function passed as a parameter
 *  -a closure passed as a parameter
 *  -an extension to myListener.notify
 *
 * @param notify	The notification callback.
 *
 * @extends IObject
 */
function    EventListener(notify)
{
    this.base		= IObject;
    this.base();

    this._type		= 'EventListener';
    this._notify	= null;

    this.notify		= function(event)
    {
        if (this._notify != null)
            this._notify(event);
    }


    if (notify && (notify != null))
    {
        this._notify = notify;
    }
} // !EventListener
EventListener.prototype	= new IObject;

if ((typeof(jssl) != 'undefined') && jssl && (jssl != null))
{
    if ((typeof(jssl.event) != 'undefined') && jssl.event)
    {
        jssl.event.EventListener = EventListener;
    }
    else
    {
        jssl.event	=
        {
            EventListener	: EventListener
        };
    }
}
else
{
    jssl	=
    {
        event	:
        {
            EventListener	: EventListener
        }
    };
}
